package com.xc.dao;

import com.xc.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);



    User findByPhone(String phoneNum);

    User login(@Param("phone") String phone,
               @Param("userPwd") String userPwd);

    List listByAgent(@Param("realName") String realName
            ,@Param("phone") String phone
            ,@Param("searchId") Integer searchId
            ,@Param("accountType") Integer accountType);

    List listByAdmin(@Param("realName") String realName
            ,@Param("phone") String phone
            ,@Param("searchId") Integer searchId
            ,@Param("accountType") Integer accountType);



    int CountUserSize(Integer accountType);
    BigDecimal CountUserAmt(Integer accountType);
    BigDecimal CountEnableAmt(Integer accountType);


}